#include <iostream>
#include "stonewt.h"
void display(const Stonewt & st, int n );
int main()
{
    using std::cout;
    using std::endl;
    Stonewt incognito = Stonewt(275);
    Stonewt wolfe(285.7);
    Stonewt taft(21, 8);
    // 声明中的转换方法用了explicit，所以这里要显式地转换成int
    int intStone = static_cast<int> (taft);
    cout << "Converted result: " << intStone << endl;

    cout << "The celebrity weight:" << endl;
    incognito.show_stone();
    cout << "The detective weight:" << endl;
    wolfe.show_stone();
    cout << "The president weight:" << endl;
    taft.show_stone();

    incognito = Stonewt(276.8);
    taft = Stonewt(325);
    cout << "After dinner the celebrity weight: " << "\n";
    incognito.show_lbs();

    cout << "After dinner the precident weight: " << "\n";
    taft.show_lbs();

    display(taft, 2);
    cout << "The wrestler weight event more.\n";
    display(Stonewt(422), 2);
    cout << "No stone left uneared \n";


    return 0;
}

void display(const Stonewt & st, int n) 
{
    for(int i = 0; i < n; i ++)
    {
        std::cout << "Wow! ";
        st.show_stone();
    }
}
